using UnityEngine;

public class EffectOfsystemPause : MonoBehaviour
{
	public GameObject[] sound_music;

	private GameObject AudioC;

	private void OnEnable()
	{
		AudioC = GameObject.FindGameObjectWithTag("Audio");
		if (GameManager.key_sound == 1)
		{
			sound_music[0].SetActive(value: true);
			sound_music[1].SetActive(value: false);
		}
		else
		{
			sound_music[0].SetActive(value: false);
			sound_music[1].SetActive(value: true);
		}
		if (GameManager.key_music == 1)
		{
			sound_music[2].SetActive(value: true);
			sound_music[3].SetActive(value: false);
		}
		else
		{
			sound_music[2].SetActive(value: false);
			sound_music[3].SetActive(value: true);
		}
	}

	private void OnclickSoundOn()
	{
		AudioController.Instance.SoundButtonAllGame();
		sound_music[0].SetActive(value: false);
		sound_music[1].SetActive(value: true);
		GameManager.key_sound = 0;
	}

	private void OnclickSoundOff()
	{
		AudioController.Instance.SoundButtonAllGame();
		sound_music[0].SetActive(value: true);
		sound_music[1].SetActive(value: false);
		GameManager.key_sound = 1;
	}

	private void OnclickMusicOn()
	{
		AudioController.Instance.SoundButtonAllGame();
		sound_music[2].SetActive(value: false);
		sound_music[3].SetActive(value: true);
		GameManager.key_music = 0;
		AudioC.GetComponent<AudioController>().MusicBackground.mute = true;
	}

	private void OnclickMusicOff()
	{
		AudioController.Instance.SoundButtonAllGame();
		sound_music[2].SetActive(value: true);
		sound_music[3].SetActive(value: false);
		GameManager.key_music = 1;
		AudioC.GetComponent<AudioController>().MusicBackground.mute = false;
	}
}
